using System.Collections.Generic;

namespace NotifiableLinqTests.FrameWork
{
	public abstract class CItemNotificationTestsBase : NotificationTestsBase<Item>
	{
		internal const int CountMax = 10;

		public override IEnumerable<Item> SourceInitialize()
		{
			yield return new Item(1);
			yield return new Item(2);
			yield return new Item(7);
			yield return new Item(9);
		}

		public override Item CreateNewItem()
		{
			return new Item(_rnd.Next(CountMax));
		}

		public override void ModifyItem(Item item)
		{
			item.Width = _rnd.Next(CountMax);
		}
	}

	public abstract class ItemNotificationTestsBase : NotificationTestsBase<IItem>
	{
		public const int CountMax = 10;

		public override IEnumerable<IItem> SourceInitialize()
		{
			yield return new Item(1);
			yield return new Item(2);
			yield return new Item(7);
			yield return new Item(9);
		}

		public override IItem CreateNewItem()
		{
			return new Item(_rnd.Next(CountMax));
		}

		public override void ModifyItem(IItem item)
		{
			item.Width = _rnd.Next(CountMax);
		}
	}
}